package com.mmall.controller.portal;

import com.mmall.common.ServerResponse;
import com.mmall.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
public class ProductController {
@Autowired
private ProductService productService;



    public ServerResponse  selectProductByKeywords(@RequestParam("keyword") String keyword, @RequestParam("categoryId")Integer categoryId,
                                                   @RequestParam("pageSize")  int pageSize, @RequestParam("pageNum")int pageNum,
                                                   @RequestParam("orderBy")String orderBy){
     return  productService.selectProductByKeywords(keyword,categoryId,pageSize,pageNum,orderBy);
    }

}
